<template>
  <div>
    <el-button @click="dialogVisible = true">打开</el-button>
  <el-dialog
  title="提示"
  :visible.sync="dialogVisible"
  width="30%"
  :before-close="handleClose">
  <span v-copy="copyText">这是一段信息</span>
  <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
</el-dialog>
  </div>
</template>

<script>
import copy from './elDragDialog/copy'
export default {
    name: 'checkDetail',
    directives: {
      copy,
    },
    install(Vue) {
      Object.keys(directives).forEach((key) => {
        Vue.directive(key, directives[key])
      })
    },
    data() {
      return {
        dialogVisible: false,
        copyText: 'a copy directives',
      };
    },
    methods: {
      handleClose(done) {
            done();
      }
    }
  };
</script>

<style>

</style>